const path = require('path')

console.log('拼接规范的绝对路径', path.resolve(__dirname, 'test.js'))

console.log('获取操作系统的路径分隔符', path.sep)

const textPath = 'E:\\myStudy\\study_atguigu_nodejs\\03_path模块\\test.js'
console.log('解析路径并返回对象', path.parse(textPath))

console.log('获取路径的基础名称', path.basename(textPath))

console.log('获取路径的目录名', path.dirname(textPath))

console.log('获取路径的扩展名', path.extname(textPath))